package com.fowo.api.model.adjustment.order;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ContentStyle;
import com.alibaba.excel.enums.poi.HorizontalAlignmentEnum;
import com.fowo.api.common.validator.EnumsString;
import javax.validation.constraints.*;
import lombok.Getter;
import lombok.Setter;

/** 调整单 导入导出辅助模型 */
@Getter
@Setter
public class AdjustmentOrderExcelPo {

  @NotNull(message = "调整单号不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*调整单号")
  private String orderSn;

  @NotNull(message = "仓库不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*仓库")
  private String widName;

  @ExcelIgnore
  @ExcelProperty(value = "*仓库")
  private Long wid;

  @NotBlank(message = "类型不能为空")
  @EnumsString(
    value = { "数量调整", "换标调整", "SKU调整" },
    message = "类型的可用值为 “数量调整”, “换标调整”, “SKU调整” 其中之一"
  )
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*类型")
  private String type;

  @NotBlank(message = "状态不能为空")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "*状态")
  private String status;

  @Size(max = 50, message = "备注长度不能超过20")
  @ContentStyle(
    horizontalAlignment = HorizontalAlignmentEnum.LEFT,
    dataFormat = 49
  )
  @ExcelProperty(value = "备注")
  private String remark;
}
